package com.vincent.dao;

import com.vincent.common.enums.CacheEnum;
import com.vincent.model.SystemSettingWithBLOBs;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * Created by vincent on 15-1-2.
 */
@Repository("systemSettingDao")
public class SystemSettingDao {
    @Resource
    private SystemSettingMapper systemSettingMapper;

    /**
     * 获取最新的系统设置
     * @return
     */
    @Cacheable(value = CacheEnum.SYSTEM_SETTING)
    public SystemSettingWithBLOBs getLatest(){
        return systemSettingMapper.selectLatest();
    }
}